package com.fangyi.yunmusic.controller.es;


import com.fangyi.yunmusic.pojo.es.AlbumDocument;
import com.fangyi.yunmusic.service.es.AlbumSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AlbumSearchController {

    @Autowired
    private AlbumSearchService albumSearchService;

    @GetMapping("/album/search")
    public Object queryAlbum(Integer pageNum, Integer pageSize, String query) {
//        Page<AlbumDocument> page = albumSearchService.queryAlbum(pageNum, pageSize, query);
//        return page;
        return albumSearchService.queryAlbumVO(pageNum, pageSize, query);
    }


}
